package cn.jobstart;

import org.dromara.easyes.starter.register.EsMapperScan;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.retry.annotation.EnableRetry;

/**
 * @author sunke
 * @version 1.0
 * @Description
 * @date 2023-12-06 14:18
 */

@EnableRetry //重试注解
@SpringBootApplication
@MapperScan({"cn.jobstart.dao.mapper", "cn.jobstart.dao.mapperExt"})
@ServletComponentScan(basePackages = {"cn.jobstart.filter"})
@EsMapperScan("cn.jobstart.es.mapper")
public class LiePinTaskApp {

    private static ApplicationContext applicationContext;

    public static ApplicationContext getApplicationContext() {
        return applicationContext;
    }

    public static void setApplicationContext(ApplicationContext applicationContext) {
        LiePinTaskApp.applicationContext = applicationContext;
    }

    public static void main(String[] args) {

        ConfigurableApplicationContext configurableApplicationContext = SpringApplication.run(LiePinTaskApp.class, args);


        LiePinTaskApp.setApplicationContext(configurableApplicationContext);


    }
}
